import request from '@/utils/request'

export function querySupplier(data) {
  return request({
    url: '/erpsetting/supplier/conditions',
    method: 'post',
    data
  })
}

export function getSupplier(id) {
  return request({
    url: '/erpsetting/supplier/' + id ,
    method: 'get'
  })
}

export function queryAllSupplier() {
  return request({
    url: '/erpsetting/supplier/all',
    method: 'get'
  })
}

export function createSupplier(data) {

  return request({
    url: '/erpsetting/supplier',
    method: 'post',
    data
  })
}

export function updateSupplier(data) {
  return request({
    url: '/erpsetting/supplier' + data.id,
    method: 'put',
    data
  })
}

export function deleteSupplier(id) {
  return request({
    url: '/erpsetting/supplier' + id,
    method: 'delete'
  })
}

